package cn.ren.controller;

import cn.ren.entity.Result;
import cn.ren.pojo.RpAddress;
import cn.ren.service.RpAddressService;
import com.alibaba.dubbo.config.annotation.Reference;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

/**
 * @program: exercise_health
 * @description:
 * @author: ren
 * @create: 2020-03-10 19:31
 **/
@RestController
@RequestMapping("/rpAddress_mobile")
public class RpAddressController {
    @Reference
    private RpAddressService rpAddressService;

    @RequestMapping("/findAll")
    public Result findAll(){
        try {
            List<RpAddress> list = rpAddressService.findAll();
            return new Result(true,"获取地址列表成功",list);
        } catch (Exception e) {
            e.printStackTrace();
            return new Result(false,"获取地址列表失败");
        }
    }
}
